package com.cloudbroker.bcs.common.entity;

import java.util.ArrayList;
import java.util.List;

import com.cloudbroker.bcs.common.model.Pagination;

/**
 * Created by xuyn15828 on 2016/5/4.
 */
public class PageBackVO<T extends DataBaseBackVo> extends HSBCPSBackVO {

    /**
	 * serialVersionUID
	 */
	private static final long serialVersionUID = 1L;
	protected Integer page_no;
    protected Integer page_size;
    protected Integer total_item_num;

    protected List<T> data_list;
    
    public List<T> newDataList() {
        data_list = new ArrayList<>();
        return data_list;
    }
    
    public List<T> getData_list() {
        return data_list;
    }
    
    public void setData_list(List<T> data_list) {
        this.data_list = data_list;
    }

    public PageBackVO() {}
    public PageBackVO(Pagination pagination) {
        this.page_no = pagination.getPage_no();
        this.page_size = pagination.getPage_size();
        this.total_item_num = pagination.getTotal_item_num();
    }

    public Integer getPage_no() {
        return page_no;
    }

    public void setPage_no(Integer page_no) {
        this.page_no = page_no;
    }

    public Integer getPage_size() {
        return page_size;
    }

    public void setPage_size(Integer page_size) {
        this.page_size = page_size;
    }

    public Integer getTotal_item_num() {
        return total_item_num;
    }

    public void setTotal_item_num(Integer total_item_num) {
        this.total_item_num = total_item_num;
    }
}
